In abstract algebra, an element of a commutative ring is said to be prime if it is not zero, not a unit and whenever divides for some and in , then divides or divides . Equivalently, an element is prime if, and only if, the principal ideal generated by is a nonzero prime ideal.[1]
Interest in prime elements comes from the Fundamental theorem of arithmetic, which asserts that each integer can be written in essentially only one way as 1 or −1 multiplied by a product of positive prime numbers. This led to the study of unique factorization domains, which generalize what was just illustrated in the integers.
Prime elements should not be confused with irreducible elements. In an integral domain, every prime is irreducible[2] but the converse is not true in general. However, in unique factorization domains,[3] or more generally in GCD domains, primes and irreducibles are the same.
Being prime is also relative to which ring an element is considered to be in; for example, 2 is a prime element in Z but it is not in Z[], the ring of Gaussian integers, since and 2 does not divide any factor on the right.
The following are examples of prime elements in rings: